package com.duobaoyu.dby.supply.common.biz.remote.to.refund;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * Created by shuming on 2023/11/6 18:01
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class AfterSaleAttributeTO implements Serializable {


    private List<Content> contents;

    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    @Data
    public static class Content {
        private String skuCode;

        private List<Attribute> attributes;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    @Data
    public static class Attribute {
        /**
         * 售后类型
         */
        private Integer afterSaleType;

        /**
         * 数量
         */
        private Integer num;

        /**
         * 商品可支持售后送货方式
         * 1 = 上门取件
         * 2 = 客户送货
         * 3 = 客户发货
         * 4 = 其他
         */
        private List<Integer> pickup;

        /**
         * 原因
         */
        private List<Reason> reasons;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    @Data
    public static class Reason {
        /**
         * 凭证是否必须上传 "true"表示必须要上传凭证
         */
        private Boolean needVoucher;
        /**
         * 售后原因编码
         */
        private String reasonCode;
        /**
         * 售后原因描述
         */
        private String reasonName;
    }

}
